@echo off
set a=%cd%
echo a=%a%

::set b=%a%\protos
set propath=%a%\protos


set outpath=%a%\protomsg





set e=%a%\protoc-gen-go.exe
echo "e=%e%"

if exist %outpath% (
	del /f /s /q %outpath%\*.*
	rd  /s /q  %outpath%
)
mkdir %outpath%

for /f "delims=" %%i in ('dir /b "%propath%\*.proto"') do (
    echo create %%i
   %a%\protoc.exe --plugin=protoc-gen-go=%e% --proto_path=%propath%  --go_out=%a%\ %%i
)


xcopy  %a%\protomsg\*.pb.go   ..\server\protomsg  /S /E /Y 

pause
::call proto2Cs.bat
::call run.bat



